<?php
/**
 * Created by PhpStorm.
 * User: happy
 * Date: 19/4/15
 * Time: 下午9:50
 */
class indexControl extends control{

    public  function  reload2(){
        $server=plugin('swoole')->get_server();
        $server->reload();
        $this->display('server_reload3');
    }
        //index.php?op=test_template
    //整体end输出才会gzip压缩,否则不会gzip压缩,可以放到redis代理,使用redis进行gzip压缩
    public  function  test_template(){
        write($this->get());
        $this->echos('aa');
        $result=  plugin('T')->include_file('index/test_template',array('mm'=>'goods'));
        $this->end($result);
    }
    //测试
    public  function demo1(){
       // swoole_exit('123');
        $aa=5/0;
        $this->echos('thanks 3 for using event bind php frame ^_^ !'.$aa);
    }
     //示例2
     public  function  demo2(){
         $this->end('ok demo5');
     }

    public  function index(){
        $main='首页访问115';
        $this->display($main);
    }
    public  function  reload(){
        $main='首页访问reload';
        $this->display($main);
    }
    //display 不会终止程序向下执行;
//
}